home *** CD-ROM | disk | FTP | other *** search
- /* This script scales the Y values and Y errors of a selected set
- by a given amount */
-
- port= 'MULTIPLOT.01'
- RESULT=''
- RC=0
-
- /* Check Multiplot is running */
- options results
- if(~show('p',port)) then do
- say "Please start Multiplot first"
- exit 1
- end
- address value port
- 'QUERY'
- if(rc ~=0) then do
- say "QUERY command failed!"
- exit 1
- end
-
- /* Check a PLOT WINDOW is activated */
- if(compare('PLOWIN',RESULT)<6) then do
- 'SAY Please select a PLOT WINDOW first'
- exit 1
- end
-
- /* Check a Data Set is selected and find out which one */
- 'PEEK 1 NOVALS'
- if(rc ~=0) then do
- 'SAY Please select a Data Set first'
- exit 1
- end
- 'LAUNCH'
- 'QUE'
- setno=word(RESULT,words(RESULT))
- 'STOP'
-
- /* Get scale factor and change Y values */
- 'PULL AREXX: Please enter scaling factor'
- scal=RESULT
- do i=1 to NOVALS
- 'SELECT SET 'setno
- 'SELECT POINT ' i
- 'SELECT REPLACE'
- 'PEEK 1'
-
- xvar=WORD(POINT,1)
- yvar=WORD(POINT,2)
- xhier=WORD(POINT,3)
- xlower=WORD(POINT,4)
- yhier=WORD(POINT,5)
- yloer=WORD(POINT,6)
-
- POINT=DELWORD(POINT,1,6)
-
- yloer= yloer * scal
- POINT=INSERT(yloer,POINT)
-
- yhier= yhier * scal
- POINT=INSERT(' ',POINT)
- POINT=INSERT(yhier,POINT)
-
- POINT=INSERT(' ',POINT)
- POINT=INSERT(xlower,POINT)
-
- POINT=INSERT(' ',POINT)
- POINT=INSERT(xhier,POINT)
-
- yvar= yvar * scal
- POINT=INSERT(' ',POINT)
- POINT=INSERT(yvar,POINT)
-
- POINT=INSERT(' ',POINT)
- POINT=INSERT(xvar,POINT)
- POKE 1
- end
-
- /* Replot */
- 'FULLPLOT'
-